use "experimental_data.dta", clear		

// Figure E.2: CDF recalled bonus level
preserve
replace recall_incentive=200 if recall_incentive>200 & condition=="low"
cumul recall_incentive if condition=="low", gen(cdf_recall_incentive_low) equal

replace recall_incentive=200 if recall_incentiv>200 & condition=="no"
cumul recall_incentive if condition=="no", gen(cdf_recall_incentive_no) equal

cumul recall_incentive if condition=="high", gen(cdf_recall_incentive_high) equal

twoway 	(connected cdf_recall_incentive_no recall_incentiv if condition=="no" & recall_incentiv>=150, sort color("142 146 153") lpattern(dash)) ///
		(connected cdf_recall_incentive_no recall_incentiv if condition=="no" & recall_incentiv<200, sort color("60 92 143") ) ///
		, xlabel(0 50 100 150 200 "200+") xscale(range(-5,210)) legend(off) xtitle("Recalled bonus level") ytitle("ECDF of recalled bonus level") /// 
		xline(0, lwidth(4) lcolor("141 158 186"%50)) ylabel(0(.2)1) title("No stakes") graphregion(color(white))
graph save cdf_recall_incentive_no.gph, replace

twoway 	(connected cdf_recall_incentive_low recall_incentive if condition=="low" & recall_incentiv>=150, sort color("142 146 153") lpattern(dash)) ///
		(connected cdf_recall_incentive_low recall_incentive if condition=="low" & recall_incentiv<200, sort color("60 92 143") ) ///
		, xlabel(0 50 100 130 150 200 "200+")  xscale(range(0,210)) legend(off) xtitle("Recalled bonus level") ytitle("ECDF of recalled bonus level") ///
		xline(130, lwidth(4) lcolor("141 158 186"%50)) title("Low stakes") graphregion(color(white))
graph save cdf_recall_incentive_low.gph, replace

twoway 	(connected cdf_recall_incentive_high recall_incentive if condition=="high", sort color("60 92 143") ) ///
		, xlabel(0(2000)10000 13000 ) xscale(range(0,13500)) legend(off) xtitle("Recalled bonus level") ytitle("ECDF of recalled bonus level") ///
		xline(13000, lwidth(4) lcolor("141 158 186"%50)) ylabel(0(.2)1) title("High stakes") graphregion(color(white))
graph save cdf_recall_incentive_high.gph, replace

graph combine cdf_recall_incentive_no.gph cdf_recall_incentive_low.gph cdf_recall_incentive_high.gph, rows(1)  xsize(8)
graph export Figs/cdf_bonus_recall_by_incentive.pdf, replace
restore



// Figure E.3: CDF response times
preserve
replace response_time=min(response_time,1000)
bys task_type condition: cumul response_time, gen(cumul_response_time) equal

* CRT
tw  	(line cumul_response_time response_time if task_type=="crt" & condition=="no", sort) ///
		(line cumul_response_time response_time if task_type=="crt" & condition=="low", sort) ///
		(line cumul_response_time response_time if task_type=="crt" & condition=="high", sort) ///
			,graphregion(color(white)) yline(1,lstyle(grid))	ylabel(0(0.25)1, angle(0) glwidth(thin) glcolor(gs15)) ///
			ytitle("Probability (Response time < x)") xtitle("Response time [sec.]") title("Cognitive Reflection Test") ///
			legend(order(3 2 1) label(3 "No incentives") label(2 "Standard incentives") label(1 "High incentives") r(2))
			graph save cdf_rt_crt.gph, replace

* BRN abstract
tw  	(line cumul_response_time response_time if task_type=="brn_abstract" & condition=="no", sort) ///
		(line cumul_response_time response_time if task_type=="brn_abstract" & condition=="low", sort) ///
		(line cumul_response_time response_time if task_type=="brn_abstract" & condition=="high", sort) ///
			,graphregion(color(white)) yline(1,lstyle(grid)) xlabel(0(200)1000)	ylabel(0(0.25)1, angle(0) glwidth(thin) glcolor(gs15)) ///
			ytitle("Probability (Response time < x)") xtitle("Response time [sec.]") title("BRN abstract") ///
			legend(order(3 2 1) label(3 "No incentives") label(2 "Standard incentives") label(1 "High incentives") r(2))
			graph save cdf_rt_brn_abstract.gph, replace
			

* BRN intuitive
tw  	(line cumul_response_time response_time if task_type=="brn_intuitive" & condition=="no", sort) ///
		(line cumul_response_time response_time if task_type=="brn_intuitive" & condition=="low", sort) ///
		(line cumul_response_time response_time if task_type=="brn_intuitive" & condition=="high", sort) ///
			,graphregion(color(white)) yline(1,lstyle(grid)) xlabel(0(200)1000)	ylabel(0(0.25)1, angle(0) glwidth(thin) glcolor(gs15)) ///
			ytitle("Probability (Response time < x)") xtitle("Response time [sec.]") title("BRN intuitive") ///
			legend(order(3 2 1) label(3 "No incentives") label(2 "Standard incentives") label(1 "High incentives") r(2))
			graph save cdf_rt_brn_intuitive.gph, replace

* Wason abstract
tw  	(line cumul_response_time response_time if task_type=="wason_abstract" & condition=="no", sort) ///
		(line cumul_response_time response_time if task_type=="wason_abstract" & condition=="low", sort) ///
		(line cumul_response_time response_time if task_type=="wason_abstract" & condition=="high", sort) ///
			,graphregion(color(white)) yline(1,lstyle(grid)) xlabel(0(200)1000)	ylabel(0(0.25)1, angle(0) glwidth(thin) glcolor(gs15)) ///
			ytitle("Probability (Response time < x)") xtitle("Response time [sec.]") title("Wason abstract") ///
			legend(order(3 2 1) label(3 "No incentives") label(2 "Standard incentives") label(1 "High incentives") r(2))
			graph save cdf_rt_wason_abstract.gph, replace
			
* Wason intuitive
tw  	(line cumul_response_time response_time if task_type=="wason_intuitive" & condition=="no", sort) ///
		(line cumul_response_time response_time if task_type=="wason_intuitive" & condition=="low", sort) ///
		(line cumul_response_time response_time if task_type=="wason_intuitive" & condition=="high", sort) ///
			,graphregion(color(white)) yline(1,lstyle(grid)) xlabel(0(200)1000)	ylabel(0(0.25)1, angle(0) glwidth(thin) glcolor(gs15)) ///
			ytitle("Probability (Response time < x)") xtitle("Response time [sec.]") title("Wason intuitive") ///
			legend(order(3 2 1) label(3 "No incentives") label(2 "Standard incentives") label(1 "High incentives") r(2))
			graph save cdf_rt_wason_intuitive.gph, replace

* Anchoring
tw  	(line cumul_response_time response_time if task_type=="anchoring" & condition=="no", sort) ///
		(line cumul_response_time response_time if task_type=="anchoring" & condition=="low", sort) ///
		(line cumul_response_time response_time if task_type=="anchoring" & condition=="high", sort) ///
			,graphregion(color(white)) yline(1,lstyle(grid)) xlabel(0(200)1000)	ylabel(0(0.25)1, angle(0) glwidth(thin) glcolor(gs15)) ///
			ytitle("Probability (Response time < x)") xtitle("Response time [sec.]") title("Anchoring") ///
			legend(order(3 2 1) label(3 "No incentives") label(2 "Standard incentives") label(1 "High incentives") r(2))
			graph save cdf_rt_anchoring.gph, replace
			
graph combine cdf_rt_crt.gph cdf_rt_brn_abstract.gph cdf_rt_brn_intuitive.gph cdf_rt_wason_abstract.gph cdf_rt_wason_intuitive.gph cdf_rt_anchoring.gph, rows(3)  
			
restore

		
preserve
		
* Generate mean and median response times and SEs
gen med_response_time=.
gen med_response_time_se=.
gen cons=0

gen mean_response_time = .
gen mean_response_time_se = .

foreach i in no low high{
	foreach j in anchoring brn_abstract brn_intuitive crt wason_abstract wason_intuitive{
		
		qreg2 norm_response_time cons if condition=="`i'" & task_type=="`j'", cl(id)
		replace med_response_time=_b[_cons] if condition=="`i'" & task_type=="`j'"
		replace med_response_time_se=_se[_cons] if condition=="`i'" & task_type=="`j'"
		
		reg norm_response_time if condition == "`i'" & task_type == "`j'", cl(id)
		replace mean_response_time = _b[_cons] if condition == "`i'" & task_type == "`j'"
		replace mean_response_time_se = _se[_cons] if condition == "`i'" & task_type == "`j'"
		}
}

gen mean_performance = .
gen mean_performance_se = .

* Generate mean performance and SEs
foreach i in no low high {
	foreach j in crt brn_abstract brn_intuitive wason_abstract wason_intuitive {
		reg correct if task_type=="`j'" & condition == "`i'", cl(id)
		replace mean_performance = _b[_cons] if task_type=="`j'" & condition == "`i'"
		replace mean_performance_se = _se[_cons] if task_type=="`j'" & condition == "`i'"
	}

	gen response_temp = response if task_type == "anchoring" & condition == "`i'"
	gen anchor_temp = anchor if task_type == "anchoring" & condition == "`i'"
	egen response_std = std(response_temp)
	egen anchor_std = std(anchor_temp)

	*Obtain correlation and clustered SE for anchoring
	reg response_std anchor_std if task_type=="anchoring" & condition == "`i'", noconstant cl(id)
	replace mean_performance = 1 - _b[anchor_std] if task_type=="anchoring" & condition == "`i'"
	replace mean_performance_se = _se[anchor_std] if task_type=="anchoring" & condition == "`i'"

	drop response_temp anchor_temp response_std anchor_std
}

		
egen tag = tag(task_type condition_number)
keep if tag == 1
drop tag

sort task_type condition_number

keep mean_performance mean_performance_se mean_response_time mean_response_time_se med_response_time med_response_time_se ///
	 norm_expert_pred_response norm_expert_pred_se_response expert_pred_performance expert_pred_se_performance ///
	 task_type condition_number condition

gen upper_performance=mean_performance+mean_performance_se
gen lower_performance=mean_performance-mean_performance_se

gen upper_response=mean_response_time+mean_response_time_se
gen lower_response=mean_response_time-mean_response_time_se

gen upper_response_med=med_response_time+med_response_time_se
gen lower_response_med=med_response_time-med_response_time_se

** Expert predictions
replace expert_pred_performance=mean_performance if condition=="no"
replace norm_expert_pred_response=mean_response_time if condition=="no" 




// Figure E.4: Median Response times

* Wason
tw 	(scatter med_response_time condition_number if task_type=="wason_abstract", color(navy)) ///
	(rcap upper_response_med lower_response_med condition_number if task_type=="wason_abstract", lcolor(navy)) ///
	(line med_response_time condition_number if task_type=="wason_abstract", lcolor(navy)) ///
	(scatter med_response_time condition_number if task_type=="wason_intuitive", color(maroon) msymbol(triangle)) ///
	(rcap upper_response_med lower_response_med condition_number if task_type=="wason_intuitive", lcolor(maroon)) ///
	(line med_response_time condition_number if task_type=="wason_intuitive", lcolor(maroon) lpattern(shortdash) ///
	graphregion(color(white)) yline(1.6,lstyle(grid)) yscale(range(0.7 1.61)) ylabel(0.8(0.2)1.6, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Normalized response time") xtitle("") title("Contingent reasoning") ///
	legend(order(3 6) label(3 "Abstract Wason") label(6 "Intuitive Wason") r(1)))
	graph export "Figs/Wason_response_med.pdf", replace
	

* BRN
tw 	(scatter med_response_time condition_number if task_type=="brn_abstract", color(navy)) ///
	(rcap upper_response_med lower_response_med condition_number if task_type=="brn_abstract", lcolor(navy)) ///
	(line med_response_time condition_number if task_type=="brn_abstract", lcolor(navy)) ///
	(scatter med_response_time condition_number if task_type=="brn_intuitive", color(maroon) msymbol(triangle)) ///
	(rcap upper_response_med lower_response_med condition_number if task_type=="brn_intuitive", lcolor(maroon)) ///
	(line med_response_time condition_number if task_type=="brn_intuitive", lcolor(maroon) lpattern(shortdash) ///
	graphregion(color(white)) yline(1.6,lstyle(grid)) yscale(range(0.7 1.61)) ylabel(0.8(0.2)1.6, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Normalized response time") xtitle("") title("Base rate neglect") ///
	legend(order(3 6) label(3 "Abstract BRN") label(6 "Intuitive BRN") r(1)))
	graph export "Figs/brn_response_med.pdf", replace
	

* CRT
tw 	(scatter med_response_time condition_number if task_type=="crt", color(navy)) ///
	(rcap upper_response_med lower_response_med condition_number if task_type=="crt", lcolor(navy)) ///
	(line med_response_time condition_number if task_type=="crt", lcolor(navy) ///
	graphregion(color(white)) yline(1.6,lstyle(grid)) yscale(range(0.7 1.61)) ylabel(0.8(0.2)1.6, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Normalized response time") xtitle("") title("Cognitive Reflection Test") ///
	legend(order(3 6) label(3 "CRT") r(1)))
	graph export "Figs/crt_response_med.pdf", replace


* Anchoring
tw 	(scatter med_response_time condition_number if task_type=="anchoring", color(navy)) ///
	(rcap upper_response_med lower_response_med condition_number if task_type=="anchoring", lcolor(navy)) ///
	(line med_response_time condition_number if task_type=="anchoring", lcolor(navy) ///
	graphregion(color(white)) yline(1.6,lstyle(grid)) yscale(range(0.7 1.61)) ylabel(0.8(0.2)1.6, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Normalized response time") xtitle("") title("Anchoring") ///
	legend(order(3 6) label(3 "Anchoring") r(1)))
	graph export "Figs/anchoring_response_med.pdf", replace


	

// Figure E:5 p-p plots residuals of log transformed response times
reg response_time_log no_stakes high_stakes if task_type=="crt", cl(id)
predict r if task_type=="crt", resid
pnorm r , title("crt") subtitle("Log(RT+1) (P-p plot residuals)") graphregion(color(white)) grid rlopts(lcolor(gs7)) xtitle("") ytitle("") color("60 92 143") msize(vsmall) saving("crt_pp.gph", replace)
drop r

reg response_time_log no_stakes high_stakes if task_type=="brn_abstract", cl(id)
predict r if task_type=="brn_abstract" , resid
pnorm r , title("brn_abstract") subtitle("Log(RT+1) (P-p plot residuals)") graphregion(color(white)) grid rlopts(lcolor(gs7)) xtitle("") ytitle("") color("60 92 143") msize(vsmall) saving("brn_abstract_pp.gph", replace)
drop r

reg response_time_log no_stakes high_stakes if task_type=="brn_intuitive", cl(id)
predict r if task_type=="brn_intuitive" , resid
pnorm r , title("brn_intuitive") subtitle("Log(RT+1) (P-p plot residuals)") graphregion(color(white)) grid rlopts(lcolor(gs7)) xtitle("") ytitle("") color("60 92 143") msize(vsmall) saving("brn_intuitive_pp.gph", replace)
drop r

reg response_time_log no_stakes high_stakes if task_type=="wason_abstract", cl(id)
predict r if task_type=="wason_abstract", resid
pnorm r , title("wason_abstract") subtitle("Log(RT+1) (P-p plot residuals)") graphregion(color(white)) grid rlopts(lcolor(gs7)) xtitle("") ytitle("") color("60 92 143") msize(vsmall) saving("wason_abstract_pp.gph", replace)
drop r

reg response_time_log no_stakes high_stakes if task_type=="wason_intuitive", cl(id)
predict r if task_type=="wason_intuitive" , resid
pnorm r , title("wason_intuitive") subtitle("Log(RT+1) (P-p plot residuals)") graphregion(color(white)) grid rlopts(lcolor(gs7)) xtitle("") ytitle("") color("60 92 143") msize(vsmall) saving("wason_intuitive_pp.gph", replace)
drop r

reg response_time_log no_stakes high_stakes if task_type=="anchoring", cl(id)
predict r if task_type=="anchoring", resid
pnorm r , title("anchoring") subtitle("Log(RT+1) (P-p plot residuals)") graphregion(color(white)) grid rlopts(lcolor(gs7)) xtitle("") ytitle("") color("60 92 143") msize(vsmall) saving("anchoring_pp.gph", replace)
drop r
	
graph combine crt_pp.gph brn_abstract_pp.gph brn_intuitive_pp.gph wason_abstract_pp.gph wason_intuitive_pp.gph anchoring_pp.gph, rows(2)  xsize(8) saving(RT_log.gph, replace)
graph export "Figs/pp_plot_RT_log_transform.pdf", replace




// Figure E.6: Mean Performance and expert predictions

* Wason
tw 	(scatter mean_performance condition_number if task_type=="wason_abstract", color(navy)) ///
	(rcap upper_performance lower_performance condition_number if task_type=="wason_abstract", lcolor(navy)) ///
	(line mean_performance condition_number if task_type=="wason_abstract", lcolor(navy)) ///
	(scatter mean_performance condition_number if task_type=="wason_intuitive", color(maroon) msymbol(triangle)) ///
	(rcap upper_performance lower_performance condition_number if task_type=="wason_intuitive", lcolor(maroon)) ///
	(line mean_performance condition_number if task_type=="wason_intuitive", lcolor(maroon) lpattern(shortdash)) ///
	(scatter expert_pred_performance condition_number if task_type=="wason_abstract", color(green) msymbol(diamond)) ///
	(line expert_pred_performance condition_number if task_type=="wason_abstract", lcolor(green) lpattern(longdash)) ///
	(scatter expert_pred_performance condition_number if task_type=="wason_intuitive", color(black) msymbol(X)) ///
	(line expert_pred_performance condition_number if task_type=="wason_intuitive", lcolor(black) lpattern(dash_dot) ///
	graphregion(color(white)) yline(.8,lstyle(grid))	ylabel(0(0.2).8, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Fraction correct") xtitle("") title("Contingent reasoning") ///
	legend(order(3 6 8 10) label(3 "Abstract Wason") label(6 "Intuitive Wason") label(8 "Abstract Wason prediction") label(10 "Intuitive Wason prediction") r(2)))
	graph export "Figs/Wason_experts.pdf", replace
	
	
* BRN
tw 	(scatter mean_performance condition_number if task_type=="brn_abstract", color(navy)) ///
	(rcap upper_performance lower_performance condition_number if task_type=="brn_abstract", lcolor(navy)) ///
	(line mean_performance condition_number if task_type=="brn_abstract", lcolor(navy)) ///
	(scatter mean_performance condition_number if task_type=="brn_intuitive", color(maroon) msymbol(triangle)) ///
	(rcap upper_performance lower_performance condition_number if task_type=="brn_intuitive", lcolor(maroon)) ///
	(line mean_performance condition_number if task_type=="brn_intuitive", lcolor(maroon) lpattern(shortdash)) ///
	(scatter expert_pred_performance condition_number if task_type=="brn_abstract", color(green) msymbol(diamond)) ///
	(line expert_pred_performance condition_number if task_type=="brn_abstract", lcolor(green) lpattern(longdash)) ///
	(scatter expert_pred_performance condition_number if task_type=="brn_intuitive", color(black) msymbol(X)) ///
	(line expert_pred_performance condition_number if task_type=="brn_intuitive", lcolor(black) lpattern(dash_dot) ///
	graphregion(color(white)) yline(.8,lstyle(grid))	ylabel(0(0.2).8, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Fraction correct") xtitle("") title("Base rate neglect") ///
	legend(order(3 6 8 10) label(3 "Abstract BRN") label(6 "Intuitive BRN") label(8 "Abstract BRN prediction") label(10 "Intuitive BRN prediction") r(2)))
	graph export "Figs/brn_experts.pdf", replace
	
	
* CRT
tw 	(scatter mean_performance condition_number if task_type=="crt", color(navy)) ///
	(rcap upper_performance lower_performance condition_number if task_type=="crt", lcolor(navy)) ///
	(line mean_performance condition_number if task_type=="crt", lcolor(navy)) ///
	(scatter expert_pred_performance condition_number if task_type=="crt", color(green) msymbol(diamond)) ///
	(line expert_pred_performance condition_number if task_type=="crt", lcolor(green) lpattern(longdash) ///
	graphregion(color(white)) yline(.8,lstyle(grid))	ylabel(0(0.2).8, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Fraction correct") xtitle("") title("Cognitive Reflection Test") ///
	legend(order(3 5) label(3 "CRT") label(5 "CRT prediction") r(2)))
	graph export "Figs/crt_experts.pdf", replace
	
	
* Anchoring
tw 	(scatter mean_performance condition_number if task_type=="anchoring", color(navy)) ///
	(rcap upper_performance lower_performance condition_number if task_type=="anchoring", lcolor(navy)) ///
	(line mean_performance condition_number if task_type=="anchoring", lcolor(navy)) ///
	(scatter expert_pred_performance condition_number if task_type=="anchoring", color(green) msymbol(diamond)) ///
	(line expert_pred_performance condition_number if task_type=="anchoring", lcolor(green) lpattern(longdash) ///
	graphregion(color(white)) yline(.8,lstyle(grid)) yline(0,lstyle(grid)) ylabel(0(0.2).8, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("One minus correlation b/w response and anchor") xtitle("") title("Anchoring") ///
	legend(order(3 5) label(3 "Anchoring") label(5 "Anchoring prediction") r(2)))
	graph export "Figs/anchoring_experts.pdf", replace
	
	
	

// Figure E.6: Mean response times and expert predictions

* Wason
tw 	(scatter mean_response_time condition_number if task_type=="wason_abstract", color(navy)) ///
	(rcap upper_response lower_response condition_number if task_type=="wason_abstract", lcolor(navy)) ///
	(line mean_response_time condition_number if task_type=="wason_abstract", lcolor(navy)) ///
	(scatter mean_response_time condition_number if task_type=="wason_intuitive", color(maroon) msymbol(triangle)) ///
	(rcap upper_response lower_response condition_number if task_type=="wason_intuitive", lcolor(maroon)) ///
	(line mean_response_time condition_number if task_type=="wason_intuitive", lcolor(maroon) lpattern(shortdash)) ///
	(scatter norm_expert_pred_response condition_number if task_type=="wason_abstract", color(green) msymbol(diamond)) ///
	(line norm_expert_pred_response condition_number if task_type=="wason_abstract", lcolor(green) lpattern(longdash)) ///
	(scatter norm_expert_pred_response condition_number if task_type=="wason_intuitive", color(black) msymbol(X)) ///
	(line norm_expert_pred_response condition_number if task_type=="wason_intuitive", lcolor(black) lpattern(dash_dot) ///
	graphregion(color(white)) yline(2,lstyle(grid))	ylabel(0(0.5)2, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Normalized response time") xtitle("") title("Contingent reasoning") ///
	legend(order(3 6 8 10) label(3 "Abstract Wason") label(6 "Intuitive Wason") label(8 "Abstract Wason prediction") label(10 "Intuitive Wason prediction") r(2)))
	graph export "Figs/Wason_response_experts.pdf", replace
	
* BRN
tw 	(scatter mean_response_time condition_number if task_type=="brn_abstract", color(navy)) ///
	(rcap upper_response lower_response condition_number if task_type=="brn_abstract", lcolor(navy)) ///
	(line mean_response_time condition_number if task_type=="brn_abstract", lcolor(navy)) ///
	(scatter mean_response_time condition_number if task_type=="brn_intuitive", color(maroon) msymbol(triangle)) ///
	(rcap upper_response lower_response condition_number if task_type=="brn_intuitive", lcolor(maroon)) ///
	(line mean_response_time condition_number if task_type=="brn_intuitive", lcolor(maroon) lpattern(shortdash)) ///
	(scatter norm_expert_pred_response condition_number if task_type=="brn_abstract", color(green) msymbol(diamond)) ///
	(line norm_expert_pred_response condition_number if task_type=="brn_abstract", lcolor(green) lpattern(longdash)) ///
	(scatter norm_expert_pred_response condition_number if task_type=="brn_intuitive", color(black) msymbol(X)) ///
	(line norm_expert_pred_response condition_number if task_type=="brn_intuitive", lcolor(black) lpattern(dash_dot) ///
	graphregion(color(white)) yline(2,lstyle(grid))	ylabel(0(0.5)2, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Normalized response time") xtitle("") title("Base rate neglect") ///
	legend(order(3 6 8 10) label(3 "Abstract Base rate neglect") label(6 "Intuitive Base rate neglect") label(8 "Abstract BRN prediction") label(10 "Intuitive BRN prediction") r(2)))
	graph export "Figs/brn_response_experts.pdf", replace


* CRT
tw 	(scatter mean_response_time condition_number if task_type=="crt", color(navy)) ///
	(rcap upper_response lower_response condition_number if task_type=="crt", lcolor(navy)) ///
	(line mean_response_time condition_number if task_type=="crt", lcolor(navy)) ///
	(scatter norm_expert_pred_response condition_number if task_type=="crt", color(green) msymbol(diamond)) ///
	(line norm_expert_pred_response condition_number if task_type=="crt", lcolor(green) lpattern(longdash) ///
	graphregion(color(white)) yline(2,lstyle(grid))	ylabel(0(0.5)2, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Normalized response time") xtitle("") title("Cognitive Reflection Test") ///
	legend(order(3 5) label(3 "CRT") label(5 "CRT prediction") r(2)))
	graph export "Figs/crt_response_experts.pdf", replace


* Anchoring
tw 	(scatter mean_response_time condition_number if task_type=="anchoring", color(navy)) ///
	(rcap upper_response lower_response condition_number if task_type=="anchoring", lcolor(navy)) ///
	(line mean_response_time condition_number if task_type=="anchoring", lcolor(navy)) ///
	(scatter norm_expert_pred_response condition_number if task_type=="anchoring", color(green) msymbol(diamond)) ///
	(line norm_expert_pred_response condition_number if task_type=="anchoring", lcolor(green) lpattern(longdash) ///
	graphregion(color(white)) yline(2,lstyle(grid))	ylabel(0(0.5)2, angle(0) glwidth(thin) glcolor(gs15)) ///
	xlabel(0.25 "No incentives" 1 "Standard incentives" 1.75 "High incentives", angle(0) glwidth(thin) glcolor(gs15)) xscale(range(0 2)) ytitle("Normalized response time") xtitle("") title("Anchoring") ///
	legend(order(3 5) label(3 "Anchoring") label(5 "Anchoring prediction") r(2)))
	graph export "Figs/anchoring_response_experts.pdf", replace


restore